package com.nearby.demand.request;

import com.nearby.demand.model.UserEn;
import com.nearby.demand.utils.KLog;
import com.request.ok.http.OkHttpUtils;
import com.squareup.okhttp.Response;

/**
 * Created by Administrator on 2015/12/24.
 */
public class OkHttpRequestServer {


    public static OkHttpRequestServer instance;

    private OkHttpRequestServer() {
    }

    public static OkHttpRequestServer getInstance() {
        if (instance == null) {
            synchronized (OkHttpRequestServer.class) {
                if (instance == null) {
                    instance = new OkHttpRequestServer();
                }
            }
        }
        return instance;
    }

    public UserEn register() {
        try {
            Response response = OkHttpUtils.post().url(EnumUrl.valueOf("home_1").toString()).build().execute();
        } catch (Exception e) {
            KLog.e(e.toString());
        }
        return new UserEn();
    }
}
